import request from '@/utils/request'

// 中台 平台积分商品 分页列表
export function merchantExchangeGoodsV1List(params) {
  return request({
    url: '/merchant/exchange/goods/v1/list',
    method: 'get',
    params
  })
}
// 新增 商家兑换商品
export function merchantExchangeGoodsV1Add(data) {
    return request({
      url: '/merchant/exchange/goods/v1/add',
      method: 'post',
      data
    })
}

// 编辑 商家兑换商品
export function merchantExchangeGoodsV1Edit(data) {
    return request({
      url: '/merchant/exchange/goods/v1/edit',
      method: 'put',
      data
    })
}

// 中台 获取 平台积分商品详情
export function merchantExchangeGoodsV1Detail(id) {
    return request({
      url: `/merchant/exchange/goods/v1/detail/${id}`,
      method: 'get',
    })
}

// 中台 商家兑换商品 上下架
export function merchantExchangeGoodsV1UpdateStatus(id) {
  return request({
    url:`/merchant/exchange/goods/v1/updateStatus/${id}`,
    method: 'put'
  })
}